<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    div{
      width: 100px;
      height: 100px;
      border: 1px solid firebrick;
    }
    #big>div>div {
      width: 50px;
      height: 50px;
      background-color: cyan;
      position: absolute;
      left: 0;


    }
    #big>div{
      width: 100px;
      height: 100px;
      background-color: red;
      margin: 50px 0 0 50px;
      position: relative;
      /*如果想绝对定位的元素位置偏移，某一个元素作为参照物，
      需要给元素（参照物）添加相对定位*/
    }
    #big{
      width: 200px;
      height: 200px;
      background-color: yellow;
      margin: 100px 0 0 100px;
    }
    #d1{
      position: absolute;
      right: 20px;
      bottom: 20px;
      background-color: coral;
    }

  </style>
</head>
<body>
<div id="big">
  <div>
    <div></div>
  </div>
</div>

<div id="d1">div1</div>
<div>div2</div>
<div>div3</div>
</body>
</html>